validate
Purpose
Validates a domain class against the applied constraints (see
Validation
)
Examples
def b =
new
Book(title:
"The Shining"
)
if
( !b.validate() ) { b.errors.each { println it } }
Description
The
validate
method will validate a domain class based on its defined
constraints
. The errors will be stored within the
errors
object.